Skip to content

Conversation

tpambor
Copy link
Contributor

@tpambor tpambor commented Oct 6, 2025

Add support for hardware reset via GPIO in the ADIN2111 PHY driver.

The reset pin is configured via device tree using the reset-gpios property.

Copy link
Member

@maass-hamburg maass-hamburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also add
select GPIO if ..... to config PHY_ADIN2111 like on the other phys.

if (ret < 0) {
return ret;
}
k_busy_wait(50);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be a definite

#if ADIN2111_RST_GPIO_SUPPORT
const struct phy_adin2111_config *config = dev->config;

if (!config->reset_gpio.port) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invert if and put the new logic inside, so the goto isn't needed anymore

Comment on lines 107 to 109
#if ADIN2111_RST_GPIO_SUPPORT
const struct gpio_dt_spec reset_gpio;
#endif /* ADIN2111_RST_GPIO_SUPPORT */
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put this after the mdio bus and not between bools.

Copy link
Member

@maass-hamburg maass-hamburg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only the ADIN1100 part should support the reset pin, as the reset pin on the adin2111, which is a mac and phy combined, would reset both. also the parent mac (adi,adin1110) also has a reset-gpios prop

Add support for hardware reset via GPIO in the ADIN1100 PHY driver.

The reset pin is configured via device tree using the reset-gpios
property.

Signed-off-by: Tim Pambor <[email protected]>
@tpambor tpambor changed the title drivers: ethernet: adin2111: add support for hardware reset drivers: ethernet: adin1100: add support for hardware reset Oct 7, 2025
Copy link

sonarqubecloud bot commented Oct 7, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants